<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">-- | Various utilities used in generating assembler.</span><span>
</span><span id="line-2"></span><span class="hs-comment">--</span><span>
</span><span id="line-3"></span><span class="hs-comment">-- These are used not only by the native code generator, but also by the</span><span>
</span><span id="line-4"></span><span class="hs-comment">-- &quot;GHC.Driver.Pipeline&quot;</span><span>
</span><span id="line-5"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Utils.Asm</span><span>
</span><span id="line-6"></span><span>    </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Utils.Asm.html#sectionType"><span class="hs-identifier">sectionType</span></a></span><span>
</span><span id="line-7"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-8"></span><span>
</span><span id="line-9"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-10"></span><span>
</span><span id="line-11"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#"><span class="hs-identifier">GHC.Platform</span></a></span><span>
</span><span id="line-12"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-13"></span><span>
</span><span id="line-14"></span><span class="hs-comment">-- | Generate a section type (e.g. @\@progbits@). See #13937.</span><span>
</span><span id="line-15"></span><span class="annot"><a href="GHC.Utils.Asm.html#sectionType"><span class="hs-identifier hs-type">sectionType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-comment">-- ^ Target platform</span><span>
</span><span id="line-16"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>   </span><span class="hs-comment">-- ^ section type</span><span>
</span><span id="line-17"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>     </span><span class="hs-comment">-- ^ pretty assembler fragment</span><span>
</span><span id="line-18"></span><span id="sectionType"><span class="annot"><span class="annottext">sectionType :: Platform -&gt; String -&gt; SDoc
</span><a href="GHC.Utils.Asm.html#sectionType"><span class="hs-identifier hs-var hs-var">sectionType</span></a></span></span><span> </span><span id="local-6989586621680941537"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680941537"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680941536"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680941536"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-19"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Arch
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformArch"><span class="hs-identifier hs-var">platformArch</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680941537"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-20"></span><span>      </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#ArchARM"><span class="hs-identifier hs-type">ArchARM</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'%'</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680941536"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-21"></span><span>      </span><span class="annot"><span class="annottext">Arch
</span><span class="hs-identifier">_</span></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'@'</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680941536"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-22"></span></pre></body></html>